import { getAction, deleteAction, putAction, postAction, downFilePost,downFile } from '@/api/manage'

/**------------案事件----------------**/
const serviceName = '/incident-server'
const queryList = params => postAction(`${serviceName}/incident/queryList`, params)
const modelList = params => getAction(`${serviceName}/incidentModel/queryList`, params)
const queryTaskModel = params => getAction(`${serviceName}/incidentModel/queryTaskModel`, params)
const incidentSave = params => postAction(`${serviceName}/incident/save`, params)
const queryCodeList = params => getAction(`${serviceName}/incident/queryCodeList`, params)
const details = params => getAction(`${serviceName}/incident/details`, params)
const taskUserList = params => getAction(`${serviceName}/incidentTaskUser/getList`, params)
const taskUserPageList = params => getAction(`${serviceName}/incidentTaskUser/getPageList`, params)
const exportAddObjectTemplate = params =>
  downFilePost(`${serviceName}/incidentTaskUser/exportAddObjectTemplate`, params)
const importTaskUser = params => postAction(`${serviceName}/incidentTaskUser/importTaskUser`, params)
const taskEditStatus = params => postAction(`${serviceName}/incidentTask/editStatus`, params)
const incidentDetail = params => getAction(`${serviceName}/incident/${params}`)
const editShow = params => getAction(`${serviceName}/incident/editShow`, params)
const getDepartName = params => getAction(`/jeecg-system/sys/sysDepart/getDepartName`, params)
const exportPdf = params => downFile(`${serviceName}/incidentTask/exportPdf`, params)
const exportExecl = params => downFile(`/spacetime-collision-server/timeSpaceCollision/exportExecl`, params)
const getSampleByPhone = params => getAction(`${serviceName}/person/wxSamplePerson/getSampleByPhone`, params)
const incidentModelView = params => getAction(`${serviceName}/incidentModel/view`, params)

/**------------密文情报配置（配置情报管理）----------------**/
const serviceNameTwo = '/zxd-module-crypto-intelligence/crypto-intelligence'

const getCryptoDetail = params => postAction(`${serviceNameTwo}/config/detail`, params)
//配置: 异常进出岛人群挖掘
const digInOutIsland = params => postAction(`${serviceNameTwo}/config/digInOutIsland`, params)
//配置: 可疑船舶与人员关联挖掘
const digBoat = params => postAction(`${serviceNameTwo}/config/digBoat`, params)
//配置: 消费行为异常人群挖掘
const digConsume = params => postAction(`${serviceNameTwo}/config/digConsume`, params)
//查询区域
const getPageListByUnit = params => getAction(`${serviceName}/keyArea/getPageListByUnit`, params)

export {
  queryList,
  incidentSave,
  modelList,
  queryTaskModel,
  queryCodeList,
  details,
  taskUserList,
  taskUserPageList,
  exportAddObjectTemplate,
  importTaskUser,
  taskEditStatus,
  incidentDetail,
  editShow,
  getDepartName,
  getCryptoDetail,
  digInOutIsland,
  digBoat,
  digConsume,
  getPageListByUnit,
  exportPdf,
  exportExecl,
  getSampleByPhone,
  incidentModelView
}
